import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            meta: { title: '新东方雅思搜题', keepAlive: false },
            component: HomeView
        },
        {
            path: '/exam',
            name: 'exam',
            meta: { title: '新东方雅思搜题', keepAlive: false },
            component: () => import('../views/ExamView.vue')
        },
        {
            path: '/redirect',
            name: 'redirect',
            meta: { title: '', keepAlive: false },
            component: () => import('../views/RedirectView.vue')
        },
        {
            path: '/recordList',
            name: 'recordList',
            meta: { title: '答题记录', keepAlive: false },
            component: () => import('../views/RecordList.vue')
        },
        {
            path: '/record',
            name: 'record',
            meta: { title: '答题记录', keepAlive: false },
            component: () => import('../views/RecordDetail.vue')
        },
        {
            path: '/listenClass',
            name: 'ListenClass',
            meta: { title: '雅思听力', keepAlive: true },
            component: () => import('../views/ListenClass.vue')
        },
        {
            path: '/listenQuestionType',
            name: 'ListenQuestionType',
            meta: { title: '雅思听力', keepAlive: true },
            component: () => import('../views/ListenQuestionType.vue')
        },
        {
            path: '/listenScenario',
            name: 'ListenScenario',
            meta: { title: '雅思听力', keepAlive: true },
            component: () => import('../views/ListenScenario.vue')
        },
        {
            path: '/listenSpecial',
            name: 'ListenSpecial',
            meta: { title: '雅思听力', keepAlive: true },
            component: () => import('../views/ListenSpecial.vue')
        },
        {
            path: '/readClass',
            name: 'ReadClass',
            meta: { title: '雅思阅读', keepAlive: true },
            component: () => import('../views/ReadClass.vue')
        },
        {
            path: '/readQuestionType',
            name: 'ReadQuestionType',
            meta: { title: '雅思阅读', keepAlive: true },
            component: () => import('../views/ReadQuestionType.vue')
        },
        {
            path: '/readScenario',
            name: 'ReadScenario',
            meta: { title: '雅思阅读', keepAlive: true },
            component: () => import('../views/ReadScenario.vue')
        },
        {
            path: '/listen',
            name: 'Listen',
            meta: { title: '雅思听力', keepAlive: true },
            component: () => import('../views/listen/index.vue')
        },
        {
            path: '/read',
            name: 'Read',
            meta: { title: '雅思阅读', keepAlive: true },
            component: () => import('../views/read/index.vue')
        }
    ]
})

export default router
